package com.springcloud_consumer;

import com.myrules.MyRibbonRule;
import com.myrules.WRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

@SpringBootApplication
@EnableEurekaClient  //服务启动后，自动注册到eureka中
//@EnableDiscoveryClient //服务发现
//在微服务启动的时候就能去加载自定义的Ribbon配置类
@RibbonClient(value = "MYSPRINGCLOUD-PROVIDER", configuration = WRule.class)
public class SpringcloudConsumerApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringcloudConsumerApplication.class, args);
    }

}
